package com.ruoyi.web.studentmanagementsystem.dto;

import lombok.Data;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.Range;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * ClassName: ValidAndValidatedDTO
 * Package: com.ruoyi.web.studentmanagementsystem.dto
 * Description:
 *
 * @Author Mr. o
 * @Create 2023/11/16 15:12
 * @Version 1.0
 */
@Data
public class ValidAndValidatedDTO {
    /** 姓名 */
    @NotBlank(message = "请输入名称")
    @Length(message = "名称不能超过个 {max} 字符", max = 10)
    public String name;

    /** 年龄 */
    @NotNull(message = "请输入年龄")
    @Range(message = "年龄范围为 {min} 到 {max} 之间", min = 1, max = 100)
    public Integer age;

}
